<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Ajax Test</title>
<jsp:include page="/common/meta.jsp"></jsp:include>
<script>
	$(document).ready(
			function() {
				$("#test").click(
						function() {
							$("#loading").css("display", "block");
							setTimeout(function() {
								$.post("testAjax.action", function(json) {
									$("#result").html(
											json.name + " " + json.sex + " "
													+ json.company);
								}, "json");
								$("#loading").css("display", "none");
							}, 1000);
						});
			});
</script>
</head>
<body>
<div id="loading"
	style="display: none; position: absolute; left: 50%; top: 50%;">
<img alt="" src="<s:url value="/images/ajax/ajax-loader.gif"/>" /></div>
<div id="result"></div>
<input type="button" id="test" value="testvalue" />
</body>
</html>